﻿#-*- coding: utf-8 -*-


_tables = (
	('t_user', '''create table t_user (
		id INTEGER PRIMARY KEY,
		username TEXT,
		namealias TEXT,
		fullname TEXT,
		email TEXT,
		domainname TEXT,
		passhash TEXT,
		createdate INTEGER,
		lastlogindate INTEGER,
		theme TEXT,
		status INTEGER,
		isroot INTEGER
	)'''), 
	('t_category','''create table t_category (
		id INTEGER PRIMARY KEY,
		categoryname TEXT,
		userid  INTEGER,
		listindex INTEGER,
		postcount INTEGER
	)'''),
	('t_post', '''create table t_post (
		id INTEGER PRIMARY KEY,
		subject TEXT,
		subjecturl TEXT,
		frontphoto TEXT,
		content TEXT,
		createdate INTEGER,
		status INTEGER,
		userid INTEGER,
		categoryid INTEGER,
		commentcount INTEGER,
		lastmodified INTEGER,
		allowcomment INTEGER,
		highlight INTEGER
		visualstyle INTEGER,
		upvote INTEGER,
		downvote INTEGER
	)'''),
	('t_mediafile', '''create table t_mediafile (
		id INTEGER PRIMARY KEY,
		filename TEXT,
		filesize INTEGER,
		createdate INTEGER,
		userid INTEGER,
		postid INTEGER
	)'''),
	('t_comment', '''create table t_comment (
		id INTEGER PRIMARY KEY,
		postid INTEGER,
		userid INTEGER,
		parentid INTEGER,
		author TEXT,
		email TEXT,
		sourceurl TEXT,
		clientip TEXT,
		content TEXT,
		createdate INTEGER,
		status INTEGER,
		upvote INTEGER,
		downvote INTEGER
	)'''),
	('t_link', '''create table t_link (
		id INTEGER PRIMARY KEY,
		userid INTEGER,
		listindex INTEGER,
		label TEXT,
		url TEXT,
		highlight INTEGER,
		linkdesc TEXT,
		position INTEGER
	)''')
)
